package com.example.myapplication.presenter;

import android.content.Context;

import com.example.myapplication.R;
import com.example.myapplication.app.App;
import com.example.myapplication.base.RxPresenter;
import com.example.myapplication.model.bean.VideoChannelTable;
import com.example.myapplication.presenter.contract.VideoContract;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by meishiyiyun on 2017/6/14.
 */

public class VideoPresenter extends RxPresenter<VideoContract.View> implements VideoContract.Presenter {
    private  Context mContext;
    public VideoPresenter(Context context) {
        mContext=context;
    }

    @Override
    public void requestDataRefresh(String NewsType, String NwsIed, int page) {

    }
    /**
     * 加载视频类型
     * @return
     */
    public static List<VideoChannelTable> loadVideosChannelsMine() {
        List<String> channelName = Arrays.asList(App.getInstance().getResources().getStringArray(R.array.video_channel_name));
        List<String> channelId = Arrays.asList(App.getInstance().getResources().getStringArray(R.array.video_channel_id));
        ArrayList<VideoChannelTable>newsChannelTables=new ArrayList<>();
        for (int i = 0; i < channelName.size(); i++) {
            VideoChannelTable entity = new VideoChannelTable(channelId.get(i), channelName.get(i));
            newsChannelTables.add(entity);
        }
        return newsChannelTables;
    }
}
